define(function(require, exports){
	var pubjs = require('pubjs');
	var view = require('@base/view');
	var dialog = require('@base/dialog').base;

	var Base = view.widget.extend({
		init: function(config){
			config = pubjs.conf(config, {
				'layout': {
					"module": dialog,
					"title": LANG('新建计划弹窗'),
					"silence": false,
					"buttonConfig": {
						"ok": {
							"value": LANG('确定')
						}
					}
				}
			});

			this.Super('init', arguments);
		},
		onDialogOk: function(){
			var data = this.getData();
			// 验证数据
			if (this.validate && !this.validate(data))
			{
				return false;
			}
			var fire_name = this.getConfig('fire_name') || 'setCommonOk';
			
			this.fire(fire_name, {
				'data': data
			});
			this.hide();
			return false;
		}
	});

	exports.base = Base;
});